home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 219 < prev    next >
Encoding:
Text File  |  1996-08-06  |  2.2 KB  |  51 lines

  1. Newsgroups: comp.lang.c,comp.std.c
  2. Path: blackbush.xlink.net!slsv6bt!slsv6bt!kanze
  3. From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. In-Reply-To: seebs@solutions.solon.com's message of 29 Jan 1996 09:00:10 -0600
  6. Message-ID: <KANZE.96Jan29195038@slsvewt.lts.sel.alcatel.de>
  7. Sender: news@lts.sel.alcatel.de
  8. Organization: SEL
  9. References: <30C40F77.53B5@swsbbs.com> <DLtABq.Fzu@mv.mv.com>
  10.     <4edqh2$rvl@solutions.solon.com>
  11.     <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de>
  12.     <4eindq$eju@solutions.solon.com>
  13. Date: 29 Jan 1996 18:50:38 GMT
  14.  
  15. In article <4eindq$eju@solutions.solon.com> seebs@solutions.solon.com
  16. (Peter Seebach) writes:
  17.  
  18. |> In article <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de>,
  19. |> James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de> wrote:
  20. |> >In article <4edqh2$rvl@solutions.solon.com> seebs@solutions.solon.com
  21. |> >(Peter Seebach) writes:
  22. |> >In the particular case which you cite, I do *not* believe that gcc
  23. |> >will compile the program without a diagnostic if the program is in a
  24. |> >file called a.c.  More ever, the compiler documentation definitly
  25. |> >states that only programs in files whose names end in .c will be
  26. |> >compiled as C.  (A legal restriction, as far as I can see.)
  27.  
  28. |> That's an interesting question; the standard does not visibly make any
  29. |> such requirements, but you could argue that gcc is only a conforming compiler
  30. |> when invoked on a file ending in .c.
  31.  
  32. I think you have to.  After all, its documentation says that is a C
  33. compiler only when invoked on a file ending .c.  With other endings,
  34. it may be an assembler, a linker, a C++ compiler, or even more
  35. different things.
  36.  
  37. G++ is not alone in this situation.
  38.  
  39.     [...]
  40. |> For production code, I cheerfully assume POSIX or other standards.
  41. |> (And, of course, *document* those assumptions.)
  42.  
  43. Which means that you are counting on extensions (e.g.: undefined
  44. behavior, according to the C standard).
  45. --
  46. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  47. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  48. Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  49.                 -- A la recherche d'une activitΘ dans une region francophone
  50.  
  51.